﻿using DFGK_WMS.Model.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace DFGK_WMS.IRepository
{
    public interface ITMaterialKeyRepository:IBaseRepository<TMaterialKey>
    {
        /// <summary>
        /// 添加物料批次
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        bool AddTMaterialKey(TMaterialKey m);

        /// <summary>
        /// 删除物料批次
        /// </summary>
        /// <param name="mid"></param>
        /// <returns></returns>
        bool DelTMaterialKey(int mid);

        /// <summary>
        /// 修改物料批次
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        bool UpdTMaterialKey(TMaterialKey m);

        /// <summary>
        /// 根据主键获取对象
        /// </summary>
        /// <param name="mid"></param>
        /// <returns></returns>
        TMaterialKey GetTMaterialKeyById(int mid);

        /// <summary>
        /// 显示物料批次列表
        /// </summary>
        /// <param name="mname"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="totalCount"></param>
        /// <returns></returns>
        List<TMaterialKey> GetTMaterialKeyList(string mname, int pageIndex, int pageSize, out int totalCount);

        /// <summary>
        /// 带条件查询物料批次
        /// </summary>
        List<TMaterialKey> GetMaterialKeyList(Expression<Func<TMaterialKey, bool>> where);
        /// <summary>
        /// 导出物料批次
        /// </summary>
        /// <returns></returns>
        List<TMaterialKey> GetTmaterExcel();
    }
}
